<!--
 * @Author: tangyongxin 1463148307@qq.com
 * @Date: 2024-02-21 17:05:19
 * @LastEditors: tangyongxin 1463148307@qq.com
 * @LastEditTime: 2024-03-04 12:06:46
 * @FilePath: \patrol_front\src\views\work\patrol\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="app-container">
    <Map ref="mapps" :Nowlnglat="Nowlnglat"></Map>
  </div>
</template>
<script>
import Map from '@/components/map/index.vue'
export default {
  components: { Map },
  name: 'Home',
  data() {
    return {
      Nowlnglat: [],
      formData: {
        
      }
    }
  },
  mounted() {
   if (sessionStorage.getItem('maplng') && sessionStorage.getItem('maplat')) {
      this.formData.longitude = sessionStorage.getItem('maplng')
      this.formData.latitude = sessionStorage.getItem('maplat')
      this.Nowlnglat = [this.formData.longitude, this.formData.latitude]
      // console.log('点击后--',this.Nowlnglat)

    } else {
      this.formData.longitude = sessionStorage.getItem('maplng1')
      this.formData.latitude = sessionStorage.getItem('maplat1')
      this.Nowlnglat = [this.formData.longitude, this.formData.latitude]
      // console.log('初始化--',this.Nowlnglat)
    }
  },
  methods: {

  }
}
</script>

<style scoped>
.app-container {
  height: 100%;
  padding: 0;
}
</style>